import request from '@/utils/request'

// 查询茶叶信息列表
export function listLeaf(query) {
  return request({
    url: '/tea/leaf/list',
    method: 'get',
    params: query
  })
}

// 查询茶叶信息详细
export function getLeaf(leafId) {
  return request({
    url: '/tea/leaf/' + leafId,
    method: 'get'
  })
}

// 新增茶叶信息
export function addLeaf(data) {
  return request({
    url: '/tea/leaf',
    method: 'post',
    data: data
  })
}

// 修改茶叶信息
export function updateLeaf(data) {
  return request({
    url: '/tea/leaf',
    method: 'put',
    data: data
  })
}

// 删除茶叶信息
export function delLeaf(leafId) {
  return request({
    url: '/tea/leaf/' + leafId,
    method: 'delete'
  })
}
